package com.fcl.blog.service.impl;

import com.fcl.blog.mapper.UserMapper;
import com.fcl.blog.po.Admin;
import com.fcl.blog.po.User;
import com.fcl.blog.service.UserServie;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author 付
 * @Date 2023/10/25 14:36
 * @Version 1.0
 * @description
 * @since 1.0
 */

@Service
public class UserServieImpl implements UserServie {

    @Autowired
    private UserMapper userMapper;
    @Override
    public Admin selectByUsernameAndPassword(String username, String password) {
        return userMapper.selectByUsernameAndPassword(username,password);
    }

    @Override
    public User selectByUsernameAndPasswordToUser(String username, String password) {
        return userMapper.selectByUsernameAndPasswordToUser(username,password);
    }

    @Override
    public Admin selectById(String id) {
        return userMapper.selectById(id);
    }
}
